
<div class="form-div">
    <form action="__SELF__"  mthod = 'get' name="searchForm">
        <img src="__PUBLIC__/Admin/Images/icon_search.gif" width="26" height="22" border="0" alt="search" />
        <!-- 分类 -->
        分类：
        <?php $catId = I('get.cat_id'); ?>
        <select name="cat_id">
            <option value="0">所有分类</option>
            <foreach name="cateData" item="val">
                <option value="{$val.id}">
                    <?php echo str_repeat("-",8*$val['level']) . $val['cate_name']; ?>
                </option>
            </foreach>
        </select>
        <!-- 品牌 -->
        <p>品牌：</p>
        <?php buildSelect('brand','brand_id','id','brand_name',I('get.brand_id')); ?>
        <!-- 推荐 -->
        <select name="intro_type">
            <option value="0">全部</option>
            <option value="is_best">精品</option>
            <option value="is_new">新品</option>
            <option value="is_hot">热销</option>
        </select>
        <!-- 上架 -->
        <select name="ios">
            <option naem="all"       value=''>全部</option>
            <option name="shangjia" value="Y">上架</option>
            <option name="xiajia"   value="N">下架</option>
        </select>

        商品价格：
        从<input value="<?php echo I('get.fp'); ?>" type="text" name="fp" size="8">
        到<input value="<?php echo I('get.tp'); ?>" type="text" name="tp" size="8">
        </p>

        <br/>
            排序方式：
        <?php $odby =I('get.odby','id_desc')?>
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="id_desc">id降序
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="id_asc">id升序
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="price_desc">价格降序
        <input onclick="this.parentNode.parentNode.submit();"type='radio' name='odby' value="pirce_asc">价格升序
        <p>
        <br/>
            <p>
            添加时间：
            <input type="text" name="fa" id="fa" value="<?php echo I('get.fa') ?>" size="20"/>到
            <input type="text" name="ta" id="ta" value="<?php echo I('get.ta') ?>" size="20"/>
        </p>
        <!-- 关键字 -->
        关键字: <input type="text" value="<?php echo I('get.gn') ?>" name="gn" size="15" />
        <input type="submit" value=" 搜索 " class="button" />
    </form>
</div>

<!-- 商品列表 -->
<form method="post" action="ACTION" name="listForm" onsubmit="">
    <div class="list-div" id="listDiv">
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th style="text-align: center">编号</th>
                <th style="text-align: center">主分类</th>
                <th style="text-align: center">扩展分类</th>
                <th style="text-align: center">品牌</th>
                <th style="text-align: center">品牌LOGO</th>
                <th style="text-align: center">商品名称</th>
                <th style="text-align: center">货号</th>
                <th style="text-align: center">价格</th>
                <th style="text-align: center">上架</th>
                <th style="text-align: center">精品</th>
                <th style="text-align: center">新品</th>
                <th style="text-align: center">热销</th>
                <th style="text-align: center">推荐排序</th>
                <th style="text-align: center">操作</th>
            </tr>
            <foreach name="goodsList" item="val" key="key">
            <tr>
                <td align="center">{$val.id}</td>
                <td align="center" class="first-cell"><span>{$val.cate_name}</span></td>
                <td align="center" class="first-cell"><span>{$val.ext_cat_name}</span></td>
                <td align="center" class="first-cell"><span>{$val.brand_name}</span></td>
                <td align="center" class="first-cell">{:showImage($val['sm_logo'])}</td>
                <td align="center" class="first-cell"><span>{$val.goods_name}</span></td>
                <td align="center"><span onclick="">aaa</span></td>
                <td align="center"><span>{$val.shop_price}</span></td>
                <td align="center"><img src="<if condition='($val.is_on_sale eq  Y)'> __PUBLIC__/Admin/Images/yes.gif <else/> __PUBLIC__/Admin/Images/no.gif </if>"/></td>
                <td align="center"><img src="<if condition='($val.is_best eq 是)'> __PUBLIC__/Admin/Images/yes.gif <else/> __PUBLIC__/Admin/Images/no.gif </if>"/></td>
                <td align="center"><img src="<if condition='($val.is_new eq  是)'> __PUBLIC__/Admin/Images/yes.gif <else/> __PUBLIC__/Admin/Images/no.gif </if>"/></td>
                <td align="center"><img src="<if condition='($val.is_hot eq  是)'> __PUBLIC__/Admin/Images/yes.gif <else/> __PUBLIC__/Admin/Images/no.gif </if>"/></td>
                <td align="center"><span>100</span></td>
                <td align="center">
                <a href="{:U('Goods/good_number')}?id={$val.id}" title="库存量"><img src="__PUBLIC__/Admin/Images/icon_view.gif" width="16" height="16" border="0" /></a>
                <a href="{:U('Goods/goodsEdit')}?id={$val.id}"  title='编辑'><img src="__PUBLIC__/Admin/Images/icon_edit.gif" width="16" height="16" border="0" /></a>
                <a href="{:U('Goods/goodsDel')}?id={$val.id}" onclick="return confirm('确定要放入回收站吗？')" title="回收站"><img src="__PUBLIC__/Admin/Images/icon_trash.gif" width="16" height="16" border="0" /></a></td>
                <input type="text" hidden value="{$val.brand_id}" name="brand_id"/>
            </tr>
            </foreach>
        </table>

    <!-- 分页开始 -->

        <nav aria-label="..." style = "text-align:center">
            <ul class="pagination">
                <li>{$page}</li>
            </ul>
        </nav>

    <!-- 分页结束 -->
    </div>
</form>
<script src="__PUBLIC__/Admin/Js/tron.js"></script>
<link href="__PUBLIC__/datetimepicker/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/datetimepicker/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/datetimepicker/datepicker-zh_cn.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="__PUBLIC__/datetimepicker/time/jquery-ui-timepicker-addon.min.css" />
<script type="text/javascript" src="__PUBLIC__/datetimepicker/time/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/datetimepicker/time/i18n/jquery-ui-timepicker-addon-i18n.min.js"></script>
<script>
    // 添加时间插件
    $.timepicker.setDefaults($.timepicker.regional['zh-CN']);  // 设置使用中文

    $("#fa").datetimepicker();
    $("#ta").datetimepicker();
</script>

<!-- 引入行高亮显示 -->


